<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('日志管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row" id="customlog">

            <!--登录信息-->
            <input name="userid" th:value="${session.userid}" type="hidden" id="userid">
            <input name="username" th:value="${session.username}" type="hidden" id="username">
            <input name="deptid" th:value="${session.deptid}" type="hidden" id="deptid">

            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>特贴管理单位：</label>
                                <input type="text" name="danweimingcheng" v-model="danweimingcheng"/>
                            </li>
                            <li style="width:300px;">
                                <label>特贴管理单位层级：</label>
                                <select name="jigoujibie" v-model="jigoujibie" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option value="1">一级单位</option>
                                    <option value="2">二级单位</option>
                                    <option value="3">三级单位</option>
                                </select>
                            </li>
                            <li>
                                <label>地区：</label>
                                <input name="diqu" v-model="diqu" type="text"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-md" @click="bindLogList"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-md" @click="clearSearch"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="col-sm-12 select-table table-striped">

                <table class="table table-hover table-primary table-striped">
                    <thead>
                        <tr>
                            <th style="text-align: center; vertical-align: middle;">序号</th>
                            <th style="text-align: center; vertical-align: middle;">特贴管理单位</th>
                            <th style="text-align: center; vertical-align: middle;">特贴管理单位层级</th>
                            <th style="text-align: center; vertical-align: middle;">地区</th>
                            <th style="text-align: center; vertical-align: middle;">操作人员</th>
                            <th style="text-align: center; vertical-align: middle;">操作日期</th>
                            <th style="text-align: center; vertical-align: middle;">操作说明</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(logitem,index) in loglist"  v-if="loglist.length > 0">
                            <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="logitem.danweimingcheng"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text="biandongitem.zhengjianleixing_text"></td>-->
                            <td style="vertical-align: middle; text-align: center;" v-if="logitem.jigoujibie=='1'">一级单位</td>
                            <td style="vertical-align: middle; text-align: center;" v-else-if="logitem.jigoujibie=='2'">二级单位</td>
                            <td style="vertical-align: middle; text-align: center;" v-else-if="logitem.jigoujibie=='3'">三级单位</td>
                            <td style="vertical-align: middle; text-align: center;" v-text="logitem.diqu"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="logitem.caozuoren"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="logitem.caozuoriqi"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="logitem.caozuoshuoming"></td>
                        </tr>
                        <tr v-if="loglist.length == 0">
                            <td style="text-align: center; vertical-align: middle" colspan="7">查无数据</td>
                        </tr>
                    </tbody>
                </table>

                <div v-if="recordCount != '0'" class="my-page-navigation" style="text-align:center;">
                    <button class="btn btn-default" @click="firstPage">首页</button>
                    <button class="btn btn-default" @click="prePage">上一页</button>
                    <select class="custom-select border-secondary" v-model="pagesize">
                        <option value="10">10 条/页</option>
                        <option value="20">20 条/页</option>
                        <option value="30">30 条/页</option>
                        <option value="50">50 条/页</option>
                    </select>
                    <span v-text="pageindex + '  /  ' + pageCount" style="border-color: #6c757d"></span>
                    <span v-text="'共' + recordCount + '条'" style="border-color: #6c757d"></span>
                    <button class="btn btn-default" @click="nextPage">下一页</button>
                    <button class="btn btn-default" @click="lastPage">尾页</button>
                    <span style="border-color: #6c757d">跳到第</span>
                    <input type="text" class="form-control border-secondary" style="width:50px;display:inline;" v-model="targetpage" @keyup.enter="targetPage">
                    <span style="border-color: #6c757d">页</span>
                    <button class="btn btn-default" @click="targetPage">跳</button>
                </div>
            </div>

        </div>
    </div>
    <th:block th:include="include :: footer" />
     <th:block th:include="include :: datetimepicker-js" />
     <script th:src="@{/js/system/log/customloglist.js?v=1.0}"></script>

</body>
</html>